<?php
/*
* File：卡密清理
* Author：易如意
* QQ：51154393
* Url：www.eruyi.cn
*/

require_once 'globals.php';

$submit = isset($_POST['submit']) ? addslashes($_POST['submit']) : '';
if($submit){
	$sql="DELETE FROM `eruyi_kami` WHERE `new`='n'";
	$query=$db->query($sql);
	if($query){
		echo "<script>alert('清理成功');location.href='adm_kami.php';</script>";
	}
}else{
	require_once 'header.php';
}

?>
<form action="" method="post" id="addimg" name="addimg">
<div id="post">
<div>
	<input type="submit" name="submit" value="清理已用卡密" class="button" />
</div>
</div>
</form>
<script> 
var div = document.getElementById('del_kami'); 
div.setAttribute("class", "show"); 
</script> 
<?php 
include_once 'footer.php';
?>